home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / vgfx10.zip / GLIB1.PAS < prev    next >
Pascal/Delphi Source File  |  1994-12-01  |  808b  |  38 lines

  1. { GLIB demo program }
  2.  
  3. uses dos,crt,vgfx;
  4.  
  5. var text:array[0..286] of byte;
  6.     i:integer;
  7.  
  8. begin
  9.      { Set-up the library we want to work with }
  10.      if (not SetWorkLib('demo.gfx')) then
  11.      begin
  12.           writeln('Cannot find DEMO.GFX!');
  13.           writeln;
  14.           halt(1);
  15.      end;
  16.  
  17.      { Find TEST.DOC in DEMO.GFX and read in it's contents! }
  18.      if (LoadLib ('test.doc',text,0,286)=0) then
  19.      begin
  20.           writeln('An error occured while trying to load TEST.DOC!');
  21.           writeln;
  22.           halt(1);
  23.      end;
  24.  
  25.  
  26.      clrscr;
  27.  
  28.      writeln('I found this in DEMO.GFX:');
  29.      writeln('-------------------------');
  30.      writeln;
  31.  
  32.      { Let's print that message! }
  33.      for i:=0 to 285 do
  34.          write(chr(text[i]));
  35.  
  36.      writeln;
  37.      readkey;
  38. end.